# list1 = ['python', 'java', 'javaScript', 'php', 'golang']

# 索引正数
# print(list1[0:3])
# print(list1[:4])
# print(list1[2:])
# print(list1[3:])

# 索引负数
# print(list1[-3:-1])
# print(list1[:-2])

# 复制当前列表
# print(list1[:])
# 步数为正数
# print(list1[::3])
# 步数为负数
# 步长为正数,从左往右;步长为负数,从右往左
# print(list1[-4:-2])
# print(list1[-5:-2:1])
# print(list1[-2:-5:-1])
# print(list1[-2:-5:-1])


try:
    1 / 0
except ZeroDivisionError:
    print('0不能被除')
